<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:replace="~{/home::css_js}"></div>

</head>

<script th:inline="javascript">
    var msg=[[${msg}]];
    if(msg!=null)
        alert(msg);
    msg=null;
</script>

<div id="wrapper">

    <div th:replace="~{/home::topbar}"></div>

    <div th:replace="~{/home::sidebar}"></div>

    <div class="main">
        <!-- MAIN CONTENT -->


        <div class="main-content">
            <div class="container-fluid">

                <div id="page-inner">
                    <div class="row">
                        <div class="col-md-12">
                            <!-- Advanced Tables -->
                            <div class="card">
                                <div class="card-action">
                                    个人信息列表
                                </div>
                                <div class="card-content">
                                    <div class="table-responsive">                      <!--注意这个table标签的id=""-->
                                        <table class="table table-striped table-bordered table-hover"
                                               id="datatable">
                                            <tbody>
                                            <tr>
                                                <th>管理员编号</th>
                                                <td th:text="${self.getAdmin_id()}"></td>
                                            </tr>
                                            <tr>
                                                <th>用户名</th>
                                                <td th:text="${self.getUsername()}"></td>
                                            </tr>
                                            <tr>
                                                <th>角色身份</th>
                                                <div th:switch="${self.getRole()}">
                                                    <td th:case="0" th:text="超级管理员"></td>
                                                    <td th:case="1" th:text="系统管理员"></td>
                                                    <td th:case="2" th:text="商品管理员"></td>
                                                    <td th:case="*" th:text="/"></td>
                                                </div>
                                            </tr>
                                            <tr>
                                                <th>账号状态</th>
                                                <div th:switch="${self.getState()}">
                                                    <td th:case="1" th:text="正常"></td>
                                                    <td th:case="0" th:text="冻结"></td>
                                                    <td th:case="*" th:text="未启用"></td>
                                                </div>
                                            </tr>
                                            <tr>
                                                <th>姓名</th>
                                                <td th:text="${self.getRealname()}"></td>
                                            </tr>
                                            <tr>
                                                <th>电话</th>
                                                <td th:text="${self.getPhone()}"></td>
                                            </tr>
                                            <tr>
                                                <th>邮箱</th>
                                                <td th:text="${self.getEmail()}"></td>
                                            </tr>
                                            <tr>
                                                <th>创建日期</th>
                                                <td th:text="${#dates.format(self.getAdd_date(),'yyyy-MM-dd HH:mm:ss')}"></td>
                                            </tr>
                                            <tr>
                                                <th>最后修改日期</th>
                                                <td th:text="${#dates.format(self.getUpdate_date(),'yyyy-MM-dd HH:mm:ss')}"></td>
                                            </tr>
                                            <tr>
                                                <th>头像</th>
                                                <td th:switch="${self.getHead_pic()}">
                                                    <img th:case="null" src="/img/foodhead1.jpg" width="80" height="80">
                                                    <img th:case="*" th:src="@{'/goods_pic/'+${self.getHead_pic()}}" width="120" height="80">
                                                </td>
                                            </tr>
                                            <tr>
                                                <th>选项</th>
                                                <td>
                                                    <a class="btn btn-sm btn-primary" th:href="@{/self/modify_self}">修改</a>
                                                </td>
                                            </tr>

                                            </tbody>
                                        </table>

                                    </div>
                                </div>
                            </div>
                        </div> <!--col 12 结束-->
                    </div> <!--row 结束-->
                </div><!--page inner结束-->
            </div><!-- container-fluid 结束-->
        </div><!-- main-content 结束-->
    </div><!--main结束-->
</div><!--wrapper结束-->
</body>
</html>